package com.shanzmoo.db.module.product.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;


@Data
@Accessors(chain = true)
@ApiModel("分类树返回对象")
public class CategoryVO {

    @ApiModelProperty("分类id")
    private Integer id;

    @ApiModelProperty("分类名")
    private String name;

    @ApiModelProperty("父分类id")
    private Integer parentId;

    @ApiModelProperty("父分类名")
    private String parentName;

    @ApiModelProperty("状态")
    private Boolean status;

    @ApiModelProperty("描述")
    private String describe;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("分类级别")
    private Integer categoryLevel;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("创建人")
    private Integer createUser;

    @ApiModelProperty("是否同步商家:false 不同步,true 同步")
    private Boolean synMerchant;

    @ApiModelProperty("分类图片")
    private String pictureUrl;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("子节点集合")
    private List<CategoryVO> children;

}
